#ifndef MOVESTATE
#define MOVESTATE

#include <base\vec3f.h>
#include <app\states\sessionState.h>
#include <render\observers\moveObserver.h>

#include <boost/signal.hpp>
#include <boost/bind.hpp>

#include <string>
#include <sstream>
#include <iostream>

using namespace std;

class moveState : public sessionState, moveObserver {

  static int class_type_id;
  int type_id;

private:

  vec3f new_position;
  vec3f start_position;

  vec3f shared_position;

  boost::signal3<void, const float &, const float &, const float &> move_sig;
  bool moved; ///< indicate the position changed

public:

  static sessionState *create();

  void addMoveObserver(moveObserver *ref);
  virtual void move(const float x, const float y, const float z);
  
  void pickSharedPosition();
  vec3f getSharedPosition();

  void setStartPosition(vec3f start_position_);
  vec3f getStartPosition();

  vec3f getCurrentPosition();

  static int getClassTypeId();
  virtual int getTypeId();

  moveState();
  virtual ~moveState();
};

#endif